const mongoose = require('mongoose');
// 5.创建文档的结构对象(设置对象数据类型格式)
let Accountchema = new mongoose.Schema({
  name: {
    type: String,
    required: true, //判断该字段必填
  },
  time: String,
  type: {
    type: Number,
    enum: [1, 2],//必须是里面其中一个数据
  },
  money: Number,
  bark: String,
});
// 6.创建模型对象
let AccountModel = mongoose.model('books', Accountchema);

module.exports = AccountModel
